Skip to content

docs: generate 6.x color roles in the 6.x theme generator - #5271

Open
Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:docs/theme-generator-6x
Open

Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:docs/theme-generator-6x

Conversation

@Priyanshu0007

@Priyanshu0007 Priyanshu0007 commented Nov 20, 2026 •

Copy link
Copy Markdown

Motivation

The 6.x theme generator outputs a 5.x scheme: no surface container or fixed roles, and 5.x-only keys.

Related issue

Closes #5269

Important

Dark contrast is unchanged. background vs elevation.level1 is 1.08:1, the same as the default DarkTheme (1.09:1), since both use the same tones. Improving it means changing the DarkTheme tones in a follow-up.

Summary

  • 6.x page uses Material's dynamic scheme and outputs exactly the 6.x roles.
  • New "Match input colors" switch keeps colors close to the picked ones.
  • 5.x output unchanged.

Test plan

On the 6.x theming page, pick #1E88E5: the JSON has surfaceContainer* and fixed roles. With the switch on, primaryContainer is #0077ce.

Screenshots

Before After
before after

The 6.x theming guide's generator used Material's 2021 `Scheme`, so it
missed the surface container and fixed roles, output 5.x-only keys
(`surfaceDisabled`, `onSurfaceDisabled`, `backdrop`) and mixed `primary`
into the elevation colors.

Build the 6.x schemes with Material's dynamic scheme instead
(`SchemeTonalSpot`, or `SchemeFidelity` with the new "Match input
colors" option), output exactly the 6.x color roles, and take the
elevation colors from the surface container tones like `LightTheme` and
`DarkTheme`. The 5.x page keeps its current output.

Closes callstack#5269

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: the 6.x theme generator outputs a 5.x color scheme

1 participant